home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Controls
/
Visual Basic Controls.iso
/
vbcontrol
/
sysinfo
/
TECH4.FRM
< prev
next >
Wrap
Text File
|
1999-01-25
|
20KB
|
441 lines
VERSION 4.00
Begin VB.Form Form1
BorderStyle = 3 'Fixed Dialog
Caption = "MSysInfo Sample Tech Support Form"
ClientHeight = 4875
ClientLeft = 1260
ClientTop = 1620
ClientWidth = 9360
Height = 5280
Icon = "tech4.frx":0000
Left = 1200
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4875
ScaleWidth = 9360
ShowInTaskbar = 0 'False
Top = 1275
Width = 9480
Begin VB.CommandButton cmdPrint
Caption = "&Print"
Height = 375
Left = 7800
TabIndex = 4
Top = 4080
Width = 1455
End
Begin VB.CommandButton cmdClose
Caption = "&Close"
Height = 375
Left = 7800
TabIndex = 0
Top = 3600
Width = 1455
End
Begin TabDlg.SSTab SSTab1
Height = 3375
Left = 120
TabIndex = 1
Top = 120
Width = 9135
_ExtentX = 16113
_ExtentY = 5953
_Version = 393216
Style = 1
Tabs = 4
TabsPerRow = 4
TabHeight = 520
TabCaption(0) = "&Environment"
TabPicture(0) = "tech4.frx":030A
Tab(0).ControlEnabled= -1 'True
Tab(0).Control(0)= "Text1(0)"
Tab(0).Control(0).Enabled= 0 'False
Tab(0).ControlCount= 1
TabCaption(1) = "&Memory"
TabPicture(1) = "tech4.frx":0326
Tab(1).ControlEnabled= 0 'False
Tab(1).Control(0)= "Text1(1)"
Tab(1).ControlCount= 1
TabCaption(2) = "&Drives"
TabPicture(2) = "tech4.frx":0342
Tab(2).ControlEnabled= 0 'False
Tab(2).Control(0)= "Drive1"
Tab(2).Control(1)= "Text1(2)"
Tab(2).ControlCount= 2
TabCaption(3) = "&Files"
TabPicture(3) = "tech4.frx":035E
Tab(3).ControlEnabled= 0 'False
Tab(3).Control(0)= "Text1(3)"
Tab(3).ControlCount= 1
Begin VB.TextBox Text1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Courier"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2775
Index = 3
Left = -74880
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 8
Top = 480
Width = 8895
End
Begin VB.TextBox Text1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Courier"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2775
Index = 0
Left = 120
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 7
Top = 480
Width = 8895
End
Begin VB.TextBox Text1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Courier"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2775
Index = 1
Left = -74880
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 6
Top = 480
Width = 8895
End
Begin VB.TextBox Text1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Courier"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2775
Index = 2
Left = -74880
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 3
Top = 480
Width = 8895
End
Begin VB.DriveListBox Drive1
Height = 315
Left = -68880
TabIndex = 2
Top = 360
Visible = 0 'False
Width = 1575
End
End
Begin VB.Label Label9
Caption = "Label9"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 975
Left = 240
TabIndex = 5
Top = 3720
Width = 7335
End
Begin SystemInfoControl.MSysInfo MSysInfo1
Left = 7800
Top = 4320
_ExtentX = 847
_ExtentY = 847
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Private Type m_DriveInfo
Name As String
Total As String
Available As String
Type As String
End Type
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdPrint_Click()
MousePointer = 11
Printer.ScaleMode = vbTwips
Printer.CurrentY = 1440
Printer.Print "ENVIRONMENT:"
Printer.Print Text1(0).Text & vbCrLf
Printer.Print "MEMORY:"
Printer.Print Text1(1).Text & vbCrLf
Printer.Print "DRIVES:"
Printer.Print Text1(2).Text & vbCrLf
Printer.Print "FILES:"
Printer.Print Text1(3).Text
Printer.EndDoc
MousePointer = 0
End Sub
Private Sub Form_Load()
Dim lpTemp As String
Dim l As Long 'temp variable for our loops
Dim strHeader As String 'temp string to create a header for our results
Dim aStr() As m_DriveInfo 'our custom array
Dim mystr As String 'temp string
Dim iTotalLen As Integer 'holds the longest value so we can format the results properly
Dim iAvailableLen As Integer 'holds the longest value so we can format the results properly
mystr = "This sample project demonstrates how one might use the Mabry SysInfo control " & _
"to create a custom Form for providing information about the system on which an " & _
"application is running. A printout of such information could be used by technical support " & _
"staff in troubleshooting customer problems."
Label9.Caption = mystr
lpTemp = Me.Caption
Me.Show
cmdPrint.Enabled = False
DoEvents
MousePointer = 11
'ENVIRONMENT
Me.Caption = "Getting environment info..."
Text1(0).Text = Format$("Computer Name: ", "@@@@@@@@@@@@@@@@@@@@@@") & Trim